﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using cmsservice.Entity;

namespace cmsservice.DAL
{
    public class TZZTKDAL
    {
      
     
        public List<ZTTZK> getZTTZKListDAL()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("select b.F008V_12007 as TOP,newsid_num as Id,F006V_12001 as Title,f035d_12001 as PTime,c.f006v_12006 as Summary,F023V_12001 as plate ");
            sb.Append("from vm_dms_getnewsbycode a");
            sb.Append(" left join tb_news_12007 b on a.newsid_12001=b.newsid_12007");
            sb.Append(" left join tb_news_12006 c on a.newsid_12001=c.newsid_12006");
            sb.Append(" where code in ('7060301','7060302','7060303','7060304','7060305')");
            sb.Append(" and F004V_12001>=4");
            sb.Append(" and F008V_12007  in ('一星','二星','三星') ");
            sb.Append(" and f002v_12006='文章'");

            return SqlHelper.GetDataByColumnsLst<ZTTZK>(DBConn.NewDMSConnstr, sb.ToString(), null);
        }
    }
}